package org.linloong.modules.apis.monitor.service;


import org.linloong.modules.apis.monitor.entity.DeviceInfo;
import org.linloong.modules.apis.monitor.entity.WeatherData;
import org.linloong.modules.apis.monitor.entity.WeatherDataParsed;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.service.annotation.GetExchange;

import java.util.List;

/**
 * @author dbo
 */
public interface MonitorRemoteService {

    @GetExchange(url = "/api/Deviceinfoes('{id}')")
    DeviceInfo getDeviceInfo(@PathVariable String id);

    @GetExchange(url = "/api/devicedatas('{id}')/Current")
    WeatherData getCurrentData(@PathVariable String id);

    @GetExchange(url = "/api/devicedatas('{id}')?$filter=(Timestamp ge {startTime}) and (Timestamp le {endTime})")
    List<WeatherData> getHistoryDataByDate(@PathVariable String id, @PathVariable String startTime, @PathVariable String endTime);
}
